﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KSASupport
{
    public partial class DepthManager
    {
        public delegate void FrameReceivedEventHandler(object Sender, FrameReceivedEventArgs e);

        /// <summary>
        /// Represents a 'frame' of image data, including contacts on and above the screen
        /// </summary>
        public class FrameReceivedEventArgs
        {
            private List<DepthBlob> currentBlobs;
            /// <summary>
            /// List of current blobs which are touching the screen
            /// </summary>
            public List<DepthBlob> CurrentBlobs
            {
                get { return currentBlobs; }
                set { currentBlobs = value; }
            }

            private List<DepthBlob> hoveringBlobs;
            /// <summary>
            /// List of blobs which are above the 'touch layer' of the screen
            /// </summary>
            public List<DepthBlob> HoveringBlobs
            {
                get { return hoveringBlobs; }
                set { hoveringBlobs = value; }
            }
        }

        public event FrameReceivedEventHandler FrameReceived;
        public virtual void OnFrameReceived(FrameReceivedEventArgs e)
        {
            if (FrameReceived != null)
            {
                FrameReceived(this, e);
            }
        }
    }
}
